home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / dos / vprintf.c < prev    next >
C/C++ Source or Header  |  1996-10-24  |  2KB  |  83 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: vprintf.c,v 1.5 1996/10/24 15:50:38 aros Exp $
  4.     $Log: vprintf.c,v $
  5.     Revision 1.5  1996/10/24 15:50:38  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.4  1996/09/13 17:50:09  digulla
  9.     Use IPTR
  10.  
  11.     Revision 1.3  1996/08/13 13:52:53  digulla
  12.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  13.     Replaced AROS_LA by AROS_LHA
  14.  
  15.     Revision 1.2  1996/08/01 17:40:59  digulla
  16.     Added standard header for all files
  17.  
  18.     Desc:
  19.     Lang: english
  20. */
  21. #include <clib/exec_protos.h>
  22. #include <dos/dos.h>
  23. #include "dos_intern.h"
  24.  
  25. void vfp_hook();
  26.  
  27. /*****************************************************************************
  28.  
  29.     NAME */
  30.     #include <clib/dos_protos.h>
  31.  
  32.     AROS_LH2(LONG, VPrintf,
  33.  
  34. /*  SYNOPSIS */
  35.     AROS_LHA(STRPTR, format,   D1),
  36.     AROS_LHA(IPTR *, argarray, D2),
  37.  
  38. /*  LOCATION */
  39.     struct DosLibrary *, DOSBase, 159, Dos)
  40.  
  41. /*  FUNCTION
  42.  
  43.     INPUTS
  44.  
  45.     RESULT
  46.  
  47.     NOTES
  48.  
  49.     EXAMPLE
  50.  
  51.     BUGS
  52.  
  53.     SEE ALSO
  54.  
  55.     INTERNALS
  56.  
  57.     HISTORY
  58.     29-10-95    digulla automatically created from
  59.                 dos_lib.fd and clib/dos_protos.h
  60.  
  61. *****************************************************************************/
  62. {
  63.     AROS_LIBFUNC_INIT
  64.     AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
  65.  
  66.     struct vfp vfp;
  67.     BPTR file=((struct Process *)FindTask(NULL))->pr_COS;
  68.  
  69.     vfp.file=file;
  70.     vfp.count=0;
  71.  
  72.     (void)RawDoFmt(format,argarray,vfp_hook,&vfp);
  73.  
  74.     /* Remove the last character (which is a NUL character) */
  75.     if(vfp.count>0)
  76.     {
  77.     vfp.count--;
  78.     ((struct FileHandle *)BADDR(file))->fh_Pos--;
  79.     }
  80.     return vfp.count;
  81.     AROS_LIBFUNC_EXIT
  82. } /* VPrintf */
  83.